using System.ComponentModel.DataAnnotations;
 using System.Data.Entity.ModelConfiguration;
using SalesPages.DomainModel;
namespace SalesPages.EntityFrameworkRepository.Mapping
{
    public class GameStatisticMap : EntityTypeConfiguration<GameStatistic>
    {
        public GameStatisticMap()
        {
            // Primary Key
            this.HasKey(t => t.id);

            // Properties
            this.Property(t => t.CountItem)
                .IsRequired()
                .HasMaxLength(50);

            // Table & Column Mappings
            this.ToTable("GameStatistics");
            this.Property(t => t.id).HasColumnName("id");
            this.Property(t => t.Gameid).HasColumnName("Gameid");
            this.Property(t => t.CountItem).HasColumnName("CountItem");
            this.Property(t => t.Number).HasColumnName("Number");
            this.Property(t => t.UpdateDate).HasColumnName("UpdateDate");
        }
    }
}
